<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="public::head('人员管理')">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8"></meta>
</head>
<body style="padding-top:50px;">
<input type="hidden" th:value="${session.Id}" id="id"/>

<div th:replace="public/top::top"></div>

<div id="Renyuanlist">

<div th:replace="main/edit_renyuan" ></div>

               <div class="primary-title"> 
					人员管理
										
					<span  class="btn btn-success" style="float:right;margin-right:15px;margin-top:10px;"
						v-on:click="toAdd()">新 增</span>
				</div>
				
				<div class="primary-content">
					<div style="margin-top:15px;text-align: center;">
						<label  style="margin-left: 20px;">姓名：</label><input type="text" class="form-control" style="width: 150px;display:inline-block;"  v-model="username"  >
						<button class="btn btn-info" @click="findVaild()" style="margin-left:15px;">查询</button>
					</div>

					<div class="table-responsive" style="overflow:inherit;margin-top:40px;">
					<table class="table table-hover table-striped">
						<thead>
							<th style="text-align:center;vertical-align:middle;">序号</th>
							<th style="text-align:center;vertical-align:middle;">姓名</th>
							<th style="text-align:center;vertical-align:middle;">账号</th>
							<th style="text-align:center;vertical-align:middle;">密码</th>
							<th style="text-align:center;vertical-align:middle;">部职别</th>

							<th style="text-align:center;vertical-align:middle;width:160px;" >操作</th>
						</thead>
						
						<tbody>
							<tr v-for="(renyuanitem,index) in renyuanlist" v-if="show">
								<td style="text-align:center;vertical-align:middle;" v-text="index+1+(pageIndex-1)*pageSize"></td>
								<td style="text-align:center;vertical-align:middle;" v-text="renyuanitem.username"></td>
								<td style="text-align:center;vertical-align:middle;" v-text="renyuanitem.account"></td>
								<td style="text-align:center;vertical-align:middle;" v-text="renyuanitem.password"></td>
								<td style="text-align:center;vertical-align:middle;" v-text="renyuanitem.buzhibie"></td>
								<td style="text-align:center;vertical-align:middle;" >
									<button v-on:click="toModify(renyuanitem.userid)" class="btn btn-primary">修 改</button>
									<button class="btn btn-danger" v-on:click="toDelete(renyuanitem.userid)">删 除</button>
								</td>
							</tr>

						</tbody>
						
					
					</table>
					<div v-if="!show" style="text-align:center;width:100%;">查无数据</div>
					
					 <div v-if="show" class="my-page-navigation">
				           <button class="btn btn-default" v-on:click="SetPageIndex">首页</button>
				           <button class="btn btn-default" v-on:click="SetPageIndexPrePage">上一页</button>
				           <span v-text="pageIndex + '  /  ' + pageCount"></span>
				           <span v-text="'共' + recordCount + '条'"></span>
				           <button class="btn btn-default" v-on:click="SetPageIndexNextPage">下一页</button>
		                   <button class="btn btn-default" v-on:click="SetPageEnd">尾页</button>
		                   <span>跳到第</span>
					      <input type="text" class="form-control" style="width: 80px;display:inline-block;"  v-model="inputPageIndexValue" v-on:keyup.enter="JumpPage">
					      <span>页</span>
					      <button class="btn btn-default" v-on:click="JumpPage">跳</button>
				      </div>

					</div>
				</div>

</div>

</body>

<script th:src="@{/js/main/list_renyuan.js}"></script>

<script type="text/javascript">
	var ID = $("#id").val();
	$(function() {
		if(ID==""){
			alert("请先登录！");
			location.href='../manage/login';
		}
	});
</script>
</html>